class StreetController < ApplicationController
  def new
    @street = Street.new
  end
  def create
    if current_user
      @street=Street.create(:name => params[:street][:name], :description => params[:street][:description])
      last_id=Street.last.id
      redirect_to :action => "new"
    else
      redirect_to :action => "index"
    end
  end
  def show
    @content=Street.find(params[:id])
  end
  def index
    @content=Street.all
  end
end
